package cn.buk.tms.entity.order.vas;

import jakarta.persistence.CascadeType;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.ForeignKey;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.Table;


/**
 * @author yfdai
 */
@Entity
@Table(name="vas_order_psg")
public class VasOrderPassenger {

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private int id;

	@Column(name = "enterprise_id")
	private int enterpriseId;

	/**
	 * 订单id
	 */
	@ManyToOne(cascade = {CascadeType.ALL})
	@JoinColumn(name = "order_id", foreignKey = @ForeignKey(name = "fk_psg_vas_order"))
	private VasOrder order;

	/**
	 * 旅客姓名
	 */
	@Column(length = 30)
	private String name;

	/**
	 * 证件类型
	 */
	@Column(name = "id_type")
	private Integer idType;

	/**
	 * 证件号码
	 */
	@Column(name = "id_no", length = 20)
	private String idNo;

	@Column(name = "ffp_no", length = 30)
	private String ffpNo;

	@Column(length = 20)
	private String mobile;

	/**
	 * 座位号（目前用来记录航班上的座位号）
	 */
	@Column(name = "seat_no", length = 5)
	private String seatNo;

	private String remark;

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		if (name != null) {
			name = name.trim().toUpperCase();
		}
		this.name = name;
	}


	public String getIdNo() {
		return idNo;
	}

	public void setIdNo(String idNo) {
		this.idNo = idNo;
	}


	public Integer getIdType() {
		return idType;
	}

	public void setIdType(int idType) {
		this.idType = idType;
	}

	public int getEnterpriseId() {
		return enterpriseId;
	}

	public void setEnterpriseId(int enterpriseId) {
		this.enterpriseId = enterpriseId;
	}


	public VasOrder getOrder() {
		return order;
	}

	public void setOrder(VasOrder order) {
		this.order = order;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	public String getFfpNo() {
		return ffpNo;
	}

	public void setFfpNo(String ffpNo) {
		this.ffpNo = ffpNo;
	}

	public String getSeatNo() {
		return seatNo;
	}

	public void setSeatNo(String seatNo) {
		this.seatNo = seatNo;
	}
}
